﻿using System;

namespace PluginRegistrationTool
{
    /// <summary>
    /// The Item Exists Class.
    /// Use this Class to store the Properties of an Assembly, Plugin, Step or Image when they are already registered in Dynamics CRM or to provide a new Identifier and indicate that they are not registered in Dynamics CRM.
    /// </summary>
    public class ItemExists
    {
        /// <summary>
        /// The new or existing Identifier Property.
        /// </summary>
        private Guid _itemId;

        /// <summary>
        /// The new or existing Identifier Property.
        /// </summary>
        public Guid ItemId
        {
            get 
            { 
                return _itemId;
            }
            set
            {
                _itemId = value; 
            }
        }

        /// <summary>
        /// Is the item already registered in Dynamics CRM.
        /// </summary>
        private bool _exists;

        /// <summary>
        /// Is the item already registered in Dynamics CRM.
        /// </summary>
        public bool Exists
        {
            get
            {
                return _exists; 
            }
            set
            {
                _exists = value; 
            }
        }

        /// <summary>
        /// The Secure Configuration Identitier Property linked to a Step.
        /// </summary>
        private Guid? _secureConfigId;

        /// <summary>
        /// The Secure Configuration Identitier Property linked to a Step.
        /// </summary>
        internal Guid? SecureConfigId
        {
            get
            {
                return _secureConfigId;
            }
            set
            {
                _secureConfigId = value;
            }
        }
    }
}
